package fafu.edu.wcy.springdemo.service.impl;

import fafu.edu.wcy.springdemo.dao.IArticlsDao;
import fafu.edu.wcy.springdemo.entity.Article;
import fafu.edu.wcy.springdemo.service.IArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleServiceImpl implements IArticleService {

    @Autowired
    IArticlsDao articlsDao;

    @Override
    public List<Article> findArticlsAll() {
        return articlsDao.findArticlsAll();
    }

    @Override
    public List<Article> findArticls(Article article) {
        return articlsDao.findArticls(article);
    }

    @Override
    public Integer insertArticle(Article article) {
        return articlsDao.insertArticle(article);
    }

    @Override
    public Integer updateArticle(Article article) {
        return articlsDao.updateArticle(article);
    }
}
